/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Rada.Html;

import Rada.RObject;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 *
 * @author Miguel
 */
public class Div extends RObject{
    List<RObject> elements;
    public Div(){
        super();
        elements = new ArrayList<RObject>();
    }
    public Div(String ide){
        super();
        ID = ide;
        elements = new ArrayList<RObject>();
    }
    public void add(RObject value){
        elements.add(value);
    }
    @Override
    public String show(){
        html="";
        html+="<div ";
        html+=getProperties();
        html+=getEvents();
        html+=">";
        Iterator it;
        it = elements.listIterator();
        while (it.hasNext()){
            html+= ((RObject) it.next()).show();
        }
        html+="</div>";
        return html;
    }
}
